V-rep tutorials << Previous Next >> Python 手冊
BubbleRob tutorial
- add a primitive sphere of diameter 0.2 to the scene with [Menu bar --> Add --> Primitive shape --> Sphere].
- adjust the X-size item to 0.2
- The created sphere will appear in the visibility layer 1 by default, and be dynamic and respondable
- items Body is respondable and Body is dynamic are enabled
- enable Collidable, Measurable, Renderable and Detectable in the object common properties for that shape

- and enter 0.02 for Along Z. We make sure that theRelative to-item is set to World. Then we click Translate selection.

- add a proximity sensor [Menu bar --> Add --> Proximity sensor --> Cone type]

- on the orientation tab, we enter 90 for Around Y and for Around Z, then click Rotate selection.

- In the position dialog, on the positiontab, we enter 0.1 for X-coord. and 0.12 for Z-coord.

- adjust items Offset to 0.005, Angle to 30 and Range to 0.15. Then, in the proximity sensor properties, we click Show detection parameters.

- uncheck item Don't allow detections if distance smaller than then close that dialog again.

- add a pure primitive cylinder with dimensions (0.08,0.08,0.02).

- set the cylinder's absolute position to (0.05,0.1,0.04) and its absolute orientation to (-90,0,0).
- As for the body of BubbleRob, we enable Collidable, Measurable, Renderable and Detectable in the object common properties.

- copy and paste the wheel, and set the absolute Y coordinate of the copy to -0.1.

- add joints (or motors) for the wheels. Click [Menu bar --> Add --> Joint --> Revolute]
- on the position tab, click the Apply to selection button

- on the orientation tab, click the Apply to selection button

- attach the left wheel to the left motor, the right wheel to the right motor, then attach the two motors to bubbleRob.


- add a force sensor object with [Menu bar --> Add --> Force sensor].













V-rep tutorials << Previous Next >> Python 手冊